# Dequote the generator supplied executable directory - this is needed
# in case of odd characters (such as spaces) in path names
string(REPLACE "\\" "" EXEC_DIR "${EXEC_DIR}")
message(EXEC_DIR: ${EXEC_DIR})

# configure_file will set BIN_DIR from the parent build, so the script
# knows what the relative binary path is.
set(BIN_DIR "@BIN_DIR@")
message(BIN_DIR: ${BIN_DIR})

# Using the above two pieces of information, construct the "root" path
# below which the standard BRL-CAD file hierarchy (binary, library, data,
# doc, etc.) is built.
string(REGEX REPLACE "${BIN_DIR}$" "" ROOT_DIR "${EXEC_DIR}")
message(ROOT_DIR: ${ROOT_DIR})

file(WRITE ${ROOT_DIR}/doc/test_file.txt "test file")

# Local Variables:
# tab-width: 8
# mode: cmake
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
